XstStringToNumber() | specType = XstStringToNumber (@ value$ , start , @ after , @ rtype , @ value$$ ) Convert all or part of a string into a number of natural data type. specType = explicit type ( or -1 for numeric format error ) XstStringToNumber() converts all or part of value$ into a numeric value. It returns the numeric value in value$$ , its natural type in rtype , and any explicit type in specType . value$ can be passed by reference for faster execution. XstStringToNumber() scans value$ from offset startOff , skips leading whitespace and unprintable characters, then converts subsequent characters into a number. If the first of the subsequent characters cannot begin a valid number, XstStringToNumber() returns specType=-1 , rtype=0 , and the offset of the bad character in afterOff . XstStringToNumber() collects characters until it encounters one that is not a valid part of a number. It returns the offset of this character in afterOff , the natural type of the number in rtype , and the value of the number in value$$ . value$$ is a GIANT number, but the numeric value stored in value$$ is not in GIANT format unless rtype=$$GIANT . rtype is always SLONG, XLONG, GIANT, SINGLE, or DOUBLE . The final return value can be extracted from value$$ as follows: SELECT CASE rtype If specType=-1 , rtype!=0 , an rtype was returned in value$$ , but the format is suspect. Examples include: 0s7F8033jk ' 8 hex digits required after "0s" If specType = SLONG , XLONG , GIANT , SINGLE , or DOUBLE , then rtype=specType , and the type was specified in the number. Examples of specified numeric types include: 0b1010010010111 ' XLONG: "0b" that fits in 32-bits |
XstStringToStringArray() | XstStringToStringArray (@ text$ , @ text$[] ) |